﻿<phone:PhoneApplicationPage 
    x:Class="ActivityTracker.Settings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:my="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"  
   xmlns:Skydrive="clr-namespace:Microsoft.Live.Controls;assembly=Microsoft.Live.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ThemeableImage="clr-namespace:ActivityTracker.Library;assembly=ActivityTracker.Library"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False"
    Loaded="PhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource bipivot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Foreground="White" Text="ACTIVITY TRACKER - SETTINGS" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>
        <Grid Grid.Row="1" x:Name="ContentPanel" Margin="10,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="101"/>
                <RowDefinition Height="110"/>
                <RowDefinition Height="101"/>
                <RowDefinition Height="101"/>
                <RowDefinition Height="85"/>
                <RowDefinition Height="75"/>
                <RowDefinition Height="75"/>
                <RowDefinition Height="80"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Orientation="Horizontal" Height="75" Margin="0,0,0,33">
                <toolkit:ToggleSwitch Foreground="White"   Name="GpsLocationToggleSwitch"  Content="Off" IsChecked="False" Height="110" HorizontalAlignment="Left" Margin="1,0,0,0" VerticalAlignment="Top" Width="417" Checked="GpsLocationToggleSwitch_Checked" Unchecked="GpsLocationToggleSwitch_Unchecked">
                    <toolkit:ToggleSwitch.Header>
                        <TextBlock Text="Location services "  Foreground="White"></TextBlock>
                    </toolkit:ToggleSwitch.Header>
                </toolkit:ToggleSwitch>
                <Image  Source="/Images/appbar.questionmark.rest.png" MouseLeftButtonDown="LocationHelpImage_MouseLeftButtonDown" Width="48" Height="48" />
            </StackPanel>
            <StackPanel Grid.Row="2" Orientation="Horizontal" Height="75" Margin="0,0,0,33">
                <toolkit:ToggleSwitch Foreground="White" Name="lockToggleSwitch"  Content="Off" IsChecked="false" Height="110" HorizontalAlignment="Left" Margin="1,0,0,0" VerticalAlignment="Top" Width="417" Checked="lockToggleSwitch_Checked" Unchecked="lockToggleSwitch_Unchecked">
                    <toolkit:ToggleSwitch.Header>
                        <TextBlock Text="Run App Under Lock screen"  Foreground="White"></TextBlock>
                    </toolkit:ToggleSwitch.Header>
                </toolkit:ToggleSwitch>
                <Image  Source="/Images/appbar.questionmark.rest.png" MouseLeftButtonDown="LocationHelpImage_MouseLeftButtonDown" Width="48" Height="48" />
            </StackPanel>
            <StackPanel Grid.Row="1" Orientation="Horizontal" Height="95" Margin="0,0,0,33">
                <toolkit:ToggleSwitch Foreground="White" Grid.Row="2" Name="LocAccuracyToggleSwitch"  Content="Default" IsChecked="false" Height="113" HorizontalAlignment="Left" Margin="1,0,0,0" VerticalAlignment="Top" Width="410" Checked="LocAccuracyToggleSwitch_Checked" Unchecked="LocAccuracyToggleSwitch_Unchecked">
                    <toolkit:ToggleSwitch.Header>
                        <TextBlock Text="Location Accuracy"  Foreground="White"></TextBlock>
                    </toolkit:ToggleSwitch.Header>
                </toolkit:ToggleSwitch>
                <Image  Source="/Images/appbar.questionmark.rest.png" MouseLeftButtonDown="LocationHelpImage_MouseLeftButtonDown" Width="48" Height="48" />
            </StackPanel>
            <toolkit:ToggleSwitch Foreground="White" Grid.Row="3" Name="EmailErrorsToggleSwitch"  Content="Off" IsChecked="false" Height="110" HorizontalAlignment="Left" Margin="1,0,0,0" VerticalAlignment="Top" Width="410" Checked="EmailErrorsToggleSwitch_Checked" Unchecked="EmailErrorsToggleSwitch_Unchecked">
                <toolkit:ToggleSwitch.Header>
                    <TextBlock Text="Automatically Email Errors "  Foreground="White"></TextBlock>
                </toolkit:ToggleSwitch.Header>
            </toolkit:ToggleSwitch>
            <toolkit:ToggleSwitch Foreground="White" Grid.Row="4" Name="TipsTrickssToggleSwitch"  Content="Off" IsChecked="false" Height="110" HorizontalAlignment="Left" Margin="1,0,0,0" VerticalAlignment="Top" Width="410" Checked="TrickandTricksToggleSwitch_Checked" Unchecked="TrickandTricksToggleSwitch_Unchecked">
                <toolkit:ToggleSwitch.Header>
                    <TextBlock Text="Tips And Tricks"  Foreground="White"></TextBlock>
                </toolkit:ToggleSwitch.Header>
            </toolkit:ToggleSwitch>

            <StackPanel Grid.Row="5" Orientation="Horizontal" x:Name="stkbackup" Visibility="Visible">
                <Button x:Name="btnBackup" Foreground="White" Content="Backup Data" Click="btnBackup_Click" Margin="10,0,0,10" Width="402" Height="70"/>
                <Image  Source="/Images/appbar.questionmark.rest.png" MouseLeftButtonDown="HelpImage_MouseLeftButtonDown" Width="48" Height="48" />
            </StackPanel>
            <StackPanel Grid.Row="5" x:Name="stkmessage" Visibility="Collapsed">
                <TextBlock Foreground="White" TextWrapping="Wrap" Width="470" Margin="5,0,5,5" Text="Please use your Live ID / Hotmail ID to login to your SkyDrive account and click on the Backup / Restore button again."></TextBlock>
            </StackPanel>
            <StackPanel Grid.Row="6" Orientation="Horizontal" x:Name="stklogin" Visibility="Collapsed">
                <Skydrive:SignInButton Content="Button" Foreground="White" Margin="10,0,0,10" Width="402" Height="70"
					Name="signInButton1" VerticalAlignment="Top"  ClientId="000000004C0BE004"
					Scopes="wl.skydrive_update" 
				
					Branding="Skydrive"
					TextType="SignIn"
					SessionChanged="OnSessionChanged" />
            </StackPanel>
            <StackPanel Grid.Row="6" Orientation="Horizontal" x:Name="stkrestore" Visibility="Visible">
                <Button Foreground="White"  x:Name="btnRestore" Content="Restore Data" Click="btnRestore_Click" Margin="10,0,0,10" Width="402" Height="70" />
                <Image  Source="/Images/appbar.questionmark.rest.png" MouseLeftButtonDown="HelpImage_MouseLeftButtonDown" Width="48" Height="48"/>
            </StackPanel>
            <my:AdControl Grid.Row="7" Margin="0,0,0,0" Height="80" HorizontalAlignment="Center" x:Name="adControl3" VerticalAlignment="Top" Width="480" ApplicationId="c8736437-6eec-403e-b9d4-333c4e6794d1" AdUnitId="28360" IsAutoRefreshEnabled="True" BorderBrush="Transparent"/>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>


